The type of an object serves two purposes:
- It expresses what operations can be applied to the objects
in question. In a way, it controls that apples cannot be added
to oranges;
- It determines the internal representation of values in
the computer's memory.
There are four basic types in Elan, denoted in program texts
by the keywords:
- INT
integral numbers in the range -2147483647 to 2147483647;
- REAL
real numbers in a precision of 14 decimals;
- BOOL
truth values, true and false; and
- TEXT
sequences of characters.
Furthermore, objects of any type can be composed into one dimensional
rows. These composed types are discussed in the subchapter on
rows.